<admintpl file="header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a>商品列表</a></li>
			<li><a href="{:U('Goods/goods_edit')}">商品添加</a></li>
		</ul>
		<form class="well form-search" method="post" action="{:U('Goods/goods_list')}" style='line-height: 46px;'>
			商品名称： 
			<input type="text" name="title" style="width: 150px;" value="{:I('request.title')}" placeholder="请输入商品名称">
			额度：<input class="js-date" type="text" name="starts" style="width: 150px;" value="{:I('request.starts')}" placeholder="最小额度">
			<input class="js-date" type="text" name="ends" style="width: 150px;" value="{:I('request.ends')}" placeholder="最大额度">
			<input type="submit" class="btn btn-primary" value="搜索" />
			<a class="btn btn-danger" href="{:U('Goods/goods_list')}">清空</a>

		</form>
		<form method="post" class="js-ajax-form">
			<table class="table table-hover table-bordered" id='tab_check'>
				<thead>
					<tr>
						<th style='min-width: 50px;' align="center">修改时间</th>
						<th>商品id</th>
						<th>商品名称</th>
						<th>额度</th>
						<th>服务费</th>
						<th>保证金</th>
						<th>借款最小周期</th>
						<th>借款最大周期</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					<foreach name="list" item="vo">
					<tr>
						<php>$time=date('Y-m-d H:i:s',$vo['modtime'])</php>
						<td>{$time|default=''}</td>
						<td>{$vo.id|default=''}</td>
						<td>{$vo.title|default=''}</td>
						<td>{$vo.amount|default=''}</td>
						<td>{$vo['interest']+$vo['examine']+$vo['consulting']}</td>
						<td>{$vo.bond_amount|default=''}</td>
						<td>{$vo.startime|default=''}</td>
						<td>{$vo.endtime|default=''}</td>
						<td align="center">
						<a href="{:U('Goods/goods_edit',array('id'=>$vo['id']))}">编辑</a>
						<if condition="($vo.status eq 0)">
						| <a class="js-ajax-dialog-btn" data-msg="是否确认启用?" href="{:U('Goods/check_type',array('id'=>$vo['id']))}">启用</a>	
						<else/>
						| <a class="js-ajax-dialog-btn" data-msg="是否确认关闭?" href="{:U('Goods/check_type',array('id'=>$vo['id']))}">关闭</a>	
						</if>
						<if condition="in_array($vo['id'],$home_page)">
						| <a class="js-ajax-dialog-btn" data-msg="是否移出首页?" href="{:U('Goods/join_hpage',array('id'=>$vo['id']))}">移出首页</a>	
						<else/>
						| <a class="js-ajax-dialog-btn" data-msg="是否确认首页展示?" href="{:U('Goods/join_hpage',array('id'=>$vo['id']))}">首页展示</a>	
						</if>
						</td>
					</tr>
					</foreach>
				</tbody>
			</table>
			<div class="pagination">{$page}</div>
		</form>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>

</body>
</html>